<?php
/**
 * Created by PhpStorm.
 * User: wz
 * Date: 2018/7/31
 * Time: 8:50
 */

namespace App\Http\Controllers\Index;

use App\Base\BaseFunc;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;

class YouController extends Controller
{
    public function gameMapList()
    {
        $data['gameMapList'] = DB::table('game_map')
            ->where('game_map_floor',session('ad_floor'))
            ->orderby('game_map_id','desc')
            ->paginate(10);
        return view('/index.you.gameMapList',$data);
    }

    public function gameMapInfo($id)
    {
        $data['gameMapInfo']  = DB::table('game_map')
            ->where('game_map_id',$id)
            ->first();
        return view('/index.you.gameMapInfo',$data);
    }

    public function gameBossList()
    {
        $data['gameMapList'] = DB::table('game_map')
            ->where('game_map_floor',session('ad_floor'))
            ->orderby('game_map_id','desc')
            ->paginate(10);
        return view('/index.you.gameMapList',$data);
    }

    public function gameBossInfo($id)
    {
        $data['gameBossInfo']  = DB::table('game_boss')
            ->where('game_boss_id',$id)
            ->first();
        return view('/index.you.gameBossInfo',$data);
    }

    public function gameNPCList()
    {
        $data['gameNPCList'] = DB::table('game_npc')
            ->where('game_npc_floor',session('ad_floor'))
            ->orderby('game_npc_id','desc')
            ->paginate(10);
        return view('/index.you.gameNPCList',$data);
    }

    public function gameNPCInfo($id)
    {
        $data['gameNPCInfo']  = DB::table('game_npc')
            ->where('game_npc',$id)
            ->first();
        return view('/index.you.gameNPCInfo',$data);
    }

    public function gameSkillList()
    {
        $data['gameSkillList'] = DB::table('game_skill')
            ->where('game_skill_floor',session('ad_floor'))
            ->orderby('game_skill_id','desc')
            ->paginate(10);
        return view('/index.you.gameSkillList',$data);
    }

    public function gameSkillInfo($id)
    {
        $data['gameSkillInfo']  = DB::table('game_skill')
            ->where('game_skill_id',$id)
            ->first();
        return view('/index.you.gameSkillInfo',$data);
    }

    public function gameZBList()
    {
        $data['gameZBList'] = DB::table('game_zb')
            ->where('game_zb_floor',session('ad_floor'))
            ->orderby('game_zb_id','desc')
            ->paginate(10);
        return view('/index.you.gameZBList',$data);
    }

    public function gameZBInfo($id)
    {
        $data['gameZBInfo']  = DB::table('game_zb')
            ->where('game_zb_id',$id)
            ->first();
        return view('/index.you.gameZBInfo',$data);
    }
}